# ！/usr/bin/env python
# -*- coding = utf-8 -*-
# ================================================
# @Time  :2021/8/5 22:33
# @Author:tyh
# @File  :task.py
# @Phone :13926528314
# ================================================
import datetime

from server import db


class Task(db.Model):

    __tablename__ = "task"
    id = db.Column(db.Integer, primary_key=True)
    remark = db.Column(db.String(120))
    create_at = db.Column(db.DateTime, default=datetime.datetime.now)
    report = db.Column(db.String(120))

    def __repr__(self):
        return '<User %r>' % self.remark

    def as_dict(self):
        return {"id":self.id, "remark":self.remark, "create_at":str(self.create_at), "report":self.report}


if __name__ == '__main__':
    db.create_all()